#ifndef RTSPSERVER_H_
#define RTSPSERVER_H_
#include <string>
#include <mutex>
#include <Afsocket.h>
#include <unordered_map>
#include "RtspConnection.h"
#include "TcpServer.h"
#include "NetMgr.h"
#include "rtsp.h"

using namespace xop;
/// <summary>
/// public Rtsp,
/// </summary>
class RtspServer : public Rtsp, public TcpServer, public std::enable_shared_from_this<RtspServer>
{
public:
	RtspServer();
	virtual ~RtspServer();

	virtual bool Start(std::string ip, uint16_t port);
	virtual void Stop();

	virtual TcpConnection::Ptr OnConnect(socket_t hSock);


	std::string GetIPAddress() const
	{
		return ip_;
	}

	uint16_t GetPort() const
	{
		return port_;
	}

	//MediaSession::Ptr LookMediaSession(const std::string& suffix);
	//MediaSession::Ptr LookMediaSession(MediaSessionId session_id);


	
};

#endif